package cn.iocoder.yudao.module.expert.dal.mysql.expertbasedata;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.expert.dal.dataobject.expertbasedata.ExpertBaseDataDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.expert.controller.admin.expertbasedata.vo.*;

/**
 * 专业字典 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface ExpertBaseDataMapper extends BaseMapperX<ExpertBaseDataDO> {

    default PageResult<ExpertBaseDataDO> selectPage(ExpertBaseDataPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ExpertBaseDataDO>()
                .likeIfPresent(ExpertBaseDataDO::getDataName, reqVO.getDataName())
                .eqIfPresent(ExpertBaseDataDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(ExpertBaseDataDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ExpertBaseDataDO::getId));
    }

}